package com.easyweb.generator.common.config;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description :
 * @FileName: MysqlTypeMapping.java
 * @Author :WeiHui.Zhang
 * @Data : 2016年3月4日 上午10:42:42
 * @Version:V1.00
 */
public class MysqlTypeMapping {

	private static final Map<String, String> typeMapping = new HashMap<>();

	static {
		typeMapping.put("int", "int");
		typeMapping.put("tinyint", "boolean");
		typeMapping.put("smallint", "int");
		typeMapping.put("bigint", "long");
		typeMapping.put("varchar", "String");
		typeMapping.put("char", "String");
		typeMapping.put("datetime", "Date");
		typeMapping.put("date", "Date");
		typeMapping.put("timestamp", "Date");
	}

	public static String getJavaType(String dataType) {
		return typeMapping.get(dataType);
	}
	
}
